import request from '@/common/request/request.js'
import config from '@/common/config/config.js';
const http = config.env

// 查询未读消息
export const getMsgUnread = () => {
	return request({
		url: http.baseUrl + '/customer/message/unread',
		method: 'GET'
	})
}

// 系统消息
export const getMsgUpdate = data => {
	return request({
		url: http.baseUrl + '/customer/message/list',
		method: 'GET',
		data: data
	})
}

// 店铺消息
export const getMsgStore = data => {
	return request({
		url: http.baseUrl + '/customer/message/index',
		method: 'GET',
		data: data
	})
}

// 点击消息置为已读
export const haveReadMsg = id => {
	return request({
		url: `${http.baseUrl}/customer/message/read/${id}`,
		method: 'GET'
	})
}
